#include "form2.h"
#include "ui_form2.h"
#include "dialog.h"
#include <QPalette>
#include <QImage>
#include <QBrush>

Form2::Form2(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Form2)
{
    ui->setupUi(this);
    /*this->resize(400,300);
    QPalette pa(this->palette());
    QImage img=QImage(":/Users/l'h'w/Desktop/265BF5B39AC78B840DDDA137EE1CBDD2.jpg");
    img=img.scaled(this->size());
    QBrush *pic=new QBrush(img);
    pa.setBrush(QPalette::Window,*pic);
    this->setPalette(pa);*///想尝试插图片，但是失败了
}

Form2::~Form2()
{
    delete ui;
}

void Form2::on_pushButton_clicked()
{
    this->close();
    f=new Dialog;
    f->show();
}
